
/*
//创建类
class ClassName {
    field;   //字段（属性）或者成员变量
    method;  //行为或者成员方法
}*/
//创建一个学生类
/*class Student {
    //属性
    public String name;
    public int age;
    public int height;
    //行为
    public void attribute() {
        System.out.println(name +"年龄：" + age);
        System.out.println(name +"身高：" + height);
    }
    public void eat() {
        System.out.println(name + "正在吃饭！");
    }
    public void learn() {
        System.out.println(name + "边吃边学习！");
    }

}
public class Test {
    public static void main(String[] args) {
        Student stu1 = new Student();
        Student stu2 = new Student();
        Student stu3 = new Student();


    }
}*/
/*
public class Test {
    public static void main(String[] args) {
        Student stu = new Student();//通过new实例化对象
        stu.name = "张三";
        stu.age = 18;
        stu.height = 180;
        stu.attribute();
        stu.eat();
        stu.learn();
    }
}*/

